package com.ruoyi.zy.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zy.mapper.VmeJingfangMapper;
import com.ruoyi.zy.domain.VmeJingfang;
import com.ruoyi.zy.service.IVmeJingfangService;
import com.ruoyi.common.core.text.Convert;

/**
 * jingfangService业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-17
 */
@Service
public class VmeJingfangServiceImpl implements IVmeJingfangService 
{
    @Autowired
    private VmeJingfangMapper vmeJingfangMapper;

    /**
     * 查询jingfang
     * 
     * @param jingfangId jingfang主键
     * @return jingfang
     */
    @Override
    public VmeJingfang selectVmeJingfangByJingfangId(Long jingfangId)
    {
        return vmeJingfangMapper.selectVmeJingfangByJingfangId(jingfangId);
    }

    /**
     * 查询jingfang列表
     * 
     * @param vmeJingfang jingfang
     * @return jingfang
     */
    @Override
    public List<VmeJingfang> selectVmeJingfangList(VmeJingfang vmeJingfang)
    {
        return vmeJingfangMapper.selectVmeJingfangList(vmeJingfang);
    }

    /**
     * 新增jingfang
     * 
     * @param vmeJingfang jingfang
     * @return 结果
     */
    @Override
    public int insertVmeJingfang(VmeJingfang vmeJingfang)
    {
        vmeJingfang.setCreateTime(DateUtils.getNowDate());
        return vmeJingfangMapper.insertVmeJingfang(vmeJingfang);
    }

    /**
     * 修改jingfang
     * 
     * @param vmeJingfang jingfang
     * @return 结果
     */
    @Override
    public int updateVmeJingfang(VmeJingfang vmeJingfang)
    {
        vmeJingfang.setUpdateTime(DateUtils.getNowDate());
        return vmeJingfangMapper.updateVmeJingfang(vmeJingfang);
    }

    /**
     * 批量删除jingfang
     * 
     * @param jingfangIds 需要删除的jingfang主键
     * @return 结果
     */
    @Override
    public int deleteVmeJingfangByJingfangIds(String jingfangIds)
    {
        return vmeJingfangMapper.deleteVmeJingfangByJingfangIds(Convert.toStrArray(jingfangIds));
    }

    /**
     * 删除jingfang信息
     * 
     * @param jingfangId jingfang主键
     * @return 结果
     */
    @Override
    public int deleteVmeJingfangByJingfangId(Long jingfangId)
    {
        return vmeJingfangMapper.deleteVmeJingfangByJingfangId(jingfangId);
    }
}
